<?php

namespace App\Http\Controllers\Admin;

use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use App\Models\Action_log;

class ActionLogController extends Controller
{
    public function index(){
        $action_logs = Action_log::with('action_info','admin')->orderBy('created_at', 'desc')->paginate(config('page.page_size'));
        //return $action_logs;
        return view('admin.action.index', compact('action_logs'));
    }

    public function destroy($id){
        $action_log = Action_log::find($id);
        $action_log->delete();
        return redirect(route('action.index'))->with('notice', '删除操作纪录成功！');
    }
}


